package com.kudian.restful.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Ad entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ad")
public class Ad implements java.io.Serializable {

	// Fields

	private Short adId;
	private String adName;
	private String adLink;
	private String mediaId;
	private Short adType;
	private Short direction;
	private Short enabled;
	private Short sortOrder;
	private Integer goodsId;

	// Constructors

	/** default constructor */
	public Ad() {
	}

	/** full constructor */
	public Ad(String adName, String adLink, String mediaId, Short adType,
			Short direction, Short enabled, Short sortOrder, Integer goodsId) {
		this.adName = adName;
		this.adLink = adLink;
		this.mediaId = mediaId;
		this.adType = adType;
		this.direction = direction;
		this.enabled = enabled;
		this.sortOrder = sortOrder;
		this.goodsId = goodsId;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ad_id", unique = true, nullable = false)
	public Short getAdId() {
		return this.adId;
	}

	public void setAdId(Short adId) {
		this.adId = adId;
	}

	@Column(name = "ad_name", nullable = false, length = 60)
	public String getAdName() {
		return this.adName;
	}

	public void setAdName(String adName) {
		this.adName = adName;
	}

	@Column(name = "ad_link", nullable = false)
	public String getAdLink() {
		return this.adLink;
	}

	public void setAdLink(String adLink) {
		this.adLink = adLink;
	}

	@Column(name = "media_id", nullable = false, length = 32)
	public String getMediaId() {
		return this.mediaId;
	}

	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}

	@Column(name = "ad_type", nullable = false)
	public Short getAdType() {
		return this.adType;
	}

	public void setAdType(Short adType) {
		this.adType = adType;
	}

	@Column(name = "direction", nullable = false)
	public Short getDirection() {
		return this.direction;
	}

	public void setDirection(Short direction) {
		this.direction = direction;
	}

	@Column(name = "enabled", nullable = false)
	public Short getEnabled() {
		return this.enabled;
	}

	public void setEnabled(Short enabled) {
		this.enabled = enabled;
	}

	@Column(name = "sort_order", nullable = false)
	public Short getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(Short sortOrder) {
		this.sortOrder = sortOrder;
	}
	@Column(name = "goods_id", nullable = false)
	public Integer getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}
}